package com.hskn.hss.module.dlbjviolation.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author hskn
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class DlbjViolationCharts implements Serializable {

    private static final long serialVersionUID = 1L;
    private String depId;
    private String depName;
    private String personId;
    private String personName;
    private String date;
    private Integer allCount;
    /**
     * 停留
     */
    private Integer tlCount = 0;
    /**
     * 离岗
     */
    private Integer lgCount = 0;
    /**
     * 聚众
     */
    private Integer jzCount = 0;


    public DlbjViolationCharts() {

    }

    public List<Object> getResList(){
        List<Object> resList=new ArrayList<>();
        if (allCount!=null) {
            resList.add(allCount);
        }else {
            resList.add(0);
        }
        if (tlCount!=null) {
            resList.add(tlCount);
        }else {
            resList.add(0);
        }
        if (lgCount!=null) {
            resList.add(lgCount);
        }else {
            resList.add(0);
        }
        if (jzCount!=null) {
            resList.add(jzCount);
        }else {
            resList.add(0);
        }
        return resList;
    }
}
